<?php
/**
 * Nuwani-v2 Bot Framework
 *
 * This file is part of the Nuwani v2 Bot Framework, a simple set of PHP classes which allow
 * you to set-up and run your own bot. It features advanced, PHP-5.3 based syntax for
 * optimal performance and security.
 *
 * Author: Peter Beverloo
 *         peter@lvp-media.com
 */

class GameEcho_Connection
{
	/**
	 * Property: m_rSocket
	 *
	 * Contains the raw PHP socket which is used for communication over the network towards
	 * the IRC server. Usually that'll be socket_create
	 */
	
	private $m_rSocket;

	/**
	 * Property: m_aConfig
	 *
	 * Configuration directives related to this connection, which will identify the message
	 * set to use, the format, and whatever more that could be convenient.
	 */
	
	private $m_aConfiguration;
	
	/**
	 * Function: __construct
	 * Argument: rSocket (resource) - The socket this connection controls.
	 * Argument: aConfiguration (array) - Configuration related with this game.
	 *
	 * In order to properly initialise the game-echo connection, we'll have to
	 * send some basic information and load configuration directives.
	 */
	
	public function __construct ($rSocket, $aConfiguration)
	{
		$this -> m_aConfiguration = $aConfiguration;
		$this -> m_rSocket = $rSocket;
	}
	
	/**
	 *
	 *
	 *
	 */
	
	public function onData ($sData)
	{
		echo 'DATA: ' . $sData . NL;
	}
	
	/**
	 *
	 *
	 *
	 */
	
	public function onOutput ($sOutput)
	{
		echo 'OUTPUT: ' . $sOutput . NL;
	}
	
};

?>